package com.zheng.wechat.mp.dao.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class WechatMpSystemUserAuthorizedExample implements Serializable {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private static final long serialVersionUID = 1L;

    public WechatMpSystemUserAuthorizedExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria implements Serializable {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNull() {
            addCriterion("user_id is null");
            return (Criteria) this;
        }

        public Criteria andUserIdIsNotNull() {
            addCriterion("user_id is not null");
            return (Criteria) this;
        }

        public Criteria andUserIdEqualTo(String value) {
            addCriterion("user_id =", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotEqualTo(String value) {
            addCriterion("user_id <>", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThan(String value) {
            addCriterion("user_id >", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdGreaterThanOrEqualTo(String value) {
            addCriterion("user_id >=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThan(String value) {
            addCriterion("user_id <", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLessThanOrEqualTo(String value) {
            addCriterion("user_id <=", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdLike(String value) {
            addCriterion("user_id like", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotLike(String value) {
            addCriterion("user_id not like", value, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdIn(List<String> values) {
            addCriterion("user_id in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotIn(List<String> values) {
            addCriterion("user_id not in", values, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdBetween(String value1, String value2) {
            addCriterion("user_id between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andUserIdNotBetween(String value1, String value2) {
            addCriterion("user_id not between", value1, value2, "userId");
            return (Criteria) this;
        }

        public Criteria andRelNameIsNull() {
            addCriterion("rel_name is null");
            return (Criteria) this;
        }

        public Criteria andRelNameIsNotNull() {
            addCriterion("rel_name is not null");
            return (Criteria) this;
        }

        public Criteria andRelNameEqualTo(String value) {
            addCriterion("rel_name =", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameNotEqualTo(String value) {
            addCriterion("rel_name <>", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameGreaterThan(String value) {
            addCriterion("rel_name >", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameGreaterThanOrEqualTo(String value) {
            addCriterion("rel_name >=", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameLessThan(String value) {
            addCriterion("rel_name <", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameLessThanOrEqualTo(String value) {
            addCriterion("rel_name <=", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameLike(String value) {
            addCriterion("rel_name like", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameNotLike(String value) {
            addCriterion("rel_name not like", value, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameIn(List<String> values) {
            addCriterion("rel_name in", values, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameNotIn(List<String> values) {
            addCriterion("rel_name not in", values, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameBetween(String value1, String value2) {
            addCriterion("rel_name between", value1, value2, "relName");
            return (Criteria) this;
        }

        public Criteria andRelNameNotBetween(String value1, String value2) {
            addCriterion("rel_name not between", value1, value2, "relName");
            return (Criteria) this;
        }

        public Criteria andRelPhoneIsNull() {
            addCriterion("rel_phone is null");
            return (Criteria) this;
        }

        public Criteria andRelPhoneIsNotNull() {
            addCriterion("rel_phone is not null");
            return (Criteria) this;
        }

        public Criteria andRelPhoneEqualTo(String value) {
            addCriterion("rel_phone =", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneNotEqualTo(String value) {
            addCriterion("rel_phone <>", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneGreaterThan(String value) {
            addCriterion("rel_phone >", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneGreaterThanOrEqualTo(String value) {
            addCriterion("rel_phone >=", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneLessThan(String value) {
            addCriterion("rel_phone <", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneLessThanOrEqualTo(String value) {
            addCriterion("rel_phone <=", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneLike(String value) {
            addCriterion("rel_phone like", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneNotLike(String value) {
            addCriterion("rel_phone not like", value, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneIn(List<String> values) {
            addCriterion("rel_phone in", values, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneNotIn(List<String> values) {
            addCriterion("rel_phone not in", values, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneBetween(String value1, String value2) {
            addCriterion("rel_phone between", value1, value2, "relPhone");
            return (Criteria) this;
        }

        public Criteria andRelPhoneNotBetween(String value1, String value2) {
            addCriterion("rel_phone not between", value1, value2, "relPhone");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeIsNull() {
            addCriterion("authorized_grade is null");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeIsNotNull() {
            addCriterion("authorized_grade is not null");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeEqualTo(String value) {
            addCriterion("authorized_grade =", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeNotEqualTo(String value) {
            addCriterion("authorized_grade <>", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeGreaterThan(String value) {
            addCriterion("authorized_grade >", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeGreaterThanOrEqualTo(String value) {
            addCriterion("authorized_grade >=", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeLessThan(String value) {
            addCriterion("authorized_grade <", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeLessThanOrEqualTo(String value) {
            addCriterion("authorized_grade <=", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeLike(String value) {
            addCriterion("authorized_grade like", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeNotLike(String value) {
            addCriterion("authorized_grade not like", value, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeIn(List<String> values) {
            addCriterion("authorized_grade in", values, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeNotIn(List<String> values) {
            addCriterion("authorized_grade not in", values, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeBetween(String value1, String value2) {
            addCriterion("authorized_grade between", value1, value2, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andAuthorizedGradeNotBetween(String value1, String value2) {
            addCriterion("authorized_grade not between", value1, value2, "authorizedGrade");
            return (Criteria) this;
        }

        public Criteria andReviewStatusIsNull() {
            addCriterion("review_status is null");
            return (Criteria) this;
        }

        public Criteria andReviewStatusIsNotNull() {
            addCriterion("review_status is not null");
            return (Criteria) this;
        }

        public Criteria andReviewStatusEqualTo(String value) {
            addCriterion("review_status =", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusNotEqualTo(String value) {
            addCriterion("review_status <>", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusGreaterThan(String value) {
            addCriterion("review_status >", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusGreaterThanOrEqualTo(String value) {
            addCriterion("review_status >=", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusLessThan(String value) {
            addCriterion("review_status <", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusLessThanOrEqualTo(String value) {
            addCriterion("review_status <=", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusLike(String value) {
            addCriterion("review_status like", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusNotLike(String value) {
            addCriterion("review_status not like", value, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusIn(List<String> values) {
            addCriterion("review_status in", values, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusNotIn(List<String> values) {
            addCriterion("review_status not in", values, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusBetween(String value1, String value2) {
            addCriterion("review_status between", value1, value2, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andReviewStatusNotBetween(String value1, String value2) {
            addCriterion("review_status not between", value1, value2, "reviewStatus");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateIsNull() {
            addCriterion("logo_set_end_date is null");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateIsNotNull() {
            addCriterion("logo_set_end_date is not null");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateEqualTo(Date value) {
            addCriterionForJDBCDate("logo_set_end_date =", value, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateNotEqualTo(Date value) {
            addCriterionForJDBCDate("logo_set_end_date <>", value, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateGreaterThan(Date value) {
            addCriterionForJDBCDate("logo_set_end_date >", value, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("logo_set_end_date >=", value, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateLessThan(Date value) {
            addCriterionForJDBCDate("logo_set_end_date <", value, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("logo_set_end_date <=", value, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateIn(List<Date> values) {
            addCriterionForJDBCDate("logo_set_end_date in", values, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateNotIn(List<Date> values) {
            addCriterionForJDBCDate("logo_set_end_date not in", values, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("logo_set_end_date between", value1, value2, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoSetEndDateNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("logo_set_end_date not between", value1, value2, "logoSetEndDate");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagIsNull() {
            addCriterion("logo_cancel_flag is null");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagIsNotNull() {
            addCriterion("logo_cancel_flag is not null");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagEqualTo(Integer value) {
            addCriterion("logo_cancel_flag =", value, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagNotEqualTo(Integer value) {
            addCriterion("logo_cancel_flag <>", value, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagGreaterThan(Integer value) {
            addCriterion("logo_cancel_flag >", value, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagGreaterThanOrEqualTo(Integer value) {
            addCriterion("logo_cancel_flag >=", value, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagLessThan(Integer value) {
            addCriterion("logo_cancel_flag <", value, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagLessThanOrEqualTo(Integer value) {
            addCriterion("logo_cancel_flag <=", value, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagIn(List<Integer> values) {
            addCriterion("logo_cancel_flag in", values, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagNotIn(List<Integer> values) {
            addCriterion("logo_cancel_flag not in", values, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagBetween(Integer value1, Integer value2) {
            addCriterion("logo_cancel_flag between", value1, value2, "logoCancelFlag");
            return (Criteria) this;
        }

        public Criteria andLogoCancelFlagNotBetween(Integer value1, Integer value2) {
            addCriterion("logo_cancel_flag not between", value1, value2, "logoCancelFlag");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria implements Serializable {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion implements Serializable {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}